package com.example.learningnote;

import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;


public class SecondActivity extends Activity {

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);

        // 获取传递过来的数据
        String userInput = getIntent().getStringExtra("user_input");

        // 找到 TextView 控件并显示数据
        TextView textView = findViewById(R.id.textView_display);
        textView.setText("你输入的内容是: " + userInput);
    }


    public void myClick(View v){
        Log.d("SecondActivity" , "给xml绑定点击事件" + v);
    }
}